package cn.hd01.repository.entity;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.persistence.Transient;

import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;
import org.springframework.format.annotation.DateTimeFormat;

import com.fasterxml.jackson.annotation.JsonFormat;

@Entity
@Table(name = "customer")
public class Customer {
	@Id
	@GeneratedValue
	private Integer id;

	private Integer oauthId;

	private String sex = "0";

	private String password;

	private Integer recommendDistributorId;
	
	private Integer recommendCustomerId;

	private Integer servantId;

	private Integer levelId;

	@Column(nullable = false)
	private String name;

	private String phoneNo;

	private String mail;

	private String address;

	private Date createTime = new Date();

	private Date updateTime = new Date();

	private String type;

	private String auditStatus;

	private String headImage;

	private Boolean activationStatus = false;
	
	private String idCardNo;
	
	private String telephoneNo;
	
	private String recordNo;
	
	private String education;
	
	private String occupation;
	
	private String customerLevel;
	
	private String medicalHistory;
	
	private String isHasRecord;
	
	@DateTimeFormat(pattern="yyyy-MM-dd")
	@JsonFormat(pattern="yyyy-MM-dd")
	private Date birthday;
	
	private String birthdayMmdd;
	
	private String marryStatus;
	
	private String childStatus;
	
	private String wx;
	
	private String personalDesc;
	
	@Transient
	private Integer age;
	
	private String feedback;
	
	/* extends attribute */
	@Transient
	private String distributorName;

	@Transient
	private String levelName;

	@Transient
	private String servantName;
	
	@Transient
	private String recommendDistributorName;
	
	@Transient
	private String recommendShopName;
	
	@Transient
	private String recommendDistributorPhoneNo;
	
	@Transient
	private String recommendCustomerName;
	
	@Transient
	private String recommendCustomerPhoneNo;
	
	@Transient
	private String auditStatusText;
	
	@Transient
	private BigDecimal allRebate;

	@Transient
	private BigDecimal allWithdrawRebate;
	
	@Transient
	private BigDecimal leftRebate;
	
	@Transient
	private List<Integer> distributorIdList;
	
	@Transient
	private DistributorDetails distributorDetails;
	
	private Integer provinceId;
	
	private String province = "";

	private Integer cityId;
	
	private String city = "";
	
	private Integer areaId;
	
	private String area = "";
	
	/***渠道商明细开始***/
	@Transient
	private String code;
	
	@Transient
	private String shopName;
	
	@Transient
	private String cooperationType;
	
	@Transient
	private String source;

	@Transient
	private Float shopArea;
	
	@Transient
	private String shopStaff;
	
	@Transient
	@DateTimeFormat(pattern="yyyy-MM-dd")
	@JsonFormat(pattern="yyyy-MM-dd")
	private Date cooperationStartTime;
	
	@Transient
	@DateTimeFormat(pattern="yyyy-MM-dd")
	@JsonFormat(pattern="yyyy-MM-dd")
	private Date cooperationEndTime;
	
	@Transient
	@DateTimeFormat(pattern="yyyy-MM-dd")
	@JsonFormat(pattern="yyyy-MM-dd")
	private Date registerTime;
	
	private String level;
	
	@Transient
	private String remark;
	
	@Transient
	private String createBeginTime;
	
	@Transient
	private String createEndTime;
	
	@Transient
	private String applyEnd;
	
	
	/**
	 * 所属客户人数
	 */
	@Transient
	private Integer customerCount;
	
	@Transient
	private String displayName;
	/***渠道商明细结束***/
	
	@Transient
	private String birthdayBegin;
	
	@Transient
	private String birthdayEnd;
	
	@Transient
	private String customerName;
	
	@Transient
	private String bankCardNum;
	
	public String getCustomerName() {
		return customerName;
	}

	public void setCustomerName(String customerName) {
		this.customerName = customerName;
	}

	public String getBankCardNum() {
		return bankCardNum;
	}

	public void setBankCardNum(String bankCardNum) {
		this.bankCardNum = bankCardNum;
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public Integer getOauthId() {
		return oauthId;
	}

	public void setOauthId(Integer oauthId) {
		this.oauthId = oauthId;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public Integer getRecommendDistributorId() {
		return recommendDistributorId;
	}

	public void setRecommendDistributorId(Integer recommendDistributorId) {
		this.recommendDistributorId = recommendDistributorId;
	}

	public Integer getServantId() {
		return servantId;
	}

	public void setServantId(Integer servantId) {
		this.servantId = servantId;
	}

	public Integer getLevelId() {
		return levelId;
	}

	public void setLevelId(Integer levelId) {
		this.levelId = levelId;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getPhoneNo() {
		return phoneNo;
	}

	public void setPhoneNo(String phoneNo) {
		this.phoneNo = phoneNo;
	}

	public String getMail() {
		return mail;
	}

	public void setMail(String mail) {
		this.mail = mail;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getAuditStatus() {
		return auditStatus;
	}

	public void setAuditStatus(String auditStatus) {
		this.auditStatus = auditStatus;
	}

	public String getDistributorName() {
		return distributorName;
	}

	public void setDistributorName(String distributorName) {
		this.distributorName = distributorName;
	}

	public String getLevelName() {
		return levelName;
	}

	public void setLevelName(String levelName) {
		this.levelName = levelName;
	}

	public String getServantName() {
		return servantName;
	}

	public void setServantName(String servantName) {
		this.servantName = servantName;
	}

	public String getHeadImage() {
		return headImage;
	}

	public void setHeadImage(String headImage) {
		this.headImage = headImage;
	}

	public Integer getProvinceId() {
		return provinceId;
	}

	public void setProvinceId(Integer provinceId) {
		this.provinceId = provinceId;
	}

	public String getProvince() {
		return province;
	}

	public void setProvince(String province) {
		this.province = province;
	}

	public Integer getCityId() {
		return cityId;
	}

	public void setCityId(Integer cityId) {
		this.cityId = cityId;
	}

	public String getCity() {
		return city;
	}

	public void setCity(String city) {
		this.city = city;
	}

	public Integer getAreaId() {
		return areaId;
	}

	public void setAreaId(Integer areaId) {
		this.areaId = areaId;
	}

	public String getArea() {
		return area;
	}

	public void setArea(String area) {
		this.area = area;
	}

	public Boolean getActivationStatus() {
		return activationStatus;
	}

	public void setActivationStatus(Boolean activationStatus) {
		this.activationStatus = activationStatus;
	}

	public String getSex() {
		return sex;
	}

	public void setSex(String sex) {
		this.sex = sex;
	}

	public String getRecommendDistributorName() {
		return recommendDistributorName;
	}

	public void setRecommendDistributorName(String recommendDistributorName) {
		this.recommendDistributorName = recommendDistributorName;
	}

	public String getRecommendDistributorPhoneNo() {
		return recommendDistributorPhoneNo;
	}

	public void setRecommendDistributorPhoneNo(String recommendDistributorPhoneNo) {
		this.recommendDistributorPhoneNo = recommendDistributorPhoneNo;
	}

	public String getAuditStatusText() {
		return auditStatusText;
	}

	public void setAuditStatusText(String auditStatusText) {
		this.auditStatusText = auditStatusText;
	}

	public BigDecimal getAllRebate() {
		return allRebate;
	}

	public void setAllRebate(BigDecimal allRebate) {
		this.allRebate = allRebate;
	}

	public BigDecimal getAllWithdrawRebate() {
		return allWithdrawRebate;
	}

	public void setAllWithdrawRebate(BigDecimal allWithdrawRebate) {
		this.allWithdrawRebate = allWithdrawRebate;
	}

	public List<Integer> getDistributorIdList() {
		return distributorIdList;
	}

	public void setDistributorIdList(List<Integer> distributorIdList) {
		this.distributorIdList = distributorIdList;
	}

	public Integer getRecommendCustomerId() {
		return recommendCustomerId;
	}

	public void setRecommendCustomerId(Integer recommendCustomerId) {
		this.recommendCustomerId = recommendCustomerId;
	}

	public String getRecommendCustomerName() {
		return recommendCustomerName;
	}

	public void setRecommendCustomerName(String recommendCustomerName) {
		this.recommendCustomerName = recommendCustomerName;
	}

	public String getRecommendCustomerPhoneNo() {
		return recommendCustomerPhoneNo;
	}

	public void setRecommendCustomerPhoneNo(String recommendCustomerPhoneNo) {
		this.recommendCustomerPhoneNo = recommendCustomerPhoneNo;
	}

	public String getIdCardNo() {
		return idCardNo;
	}

	public void setIdCardNo(String idCardNo) {
		this.idCardNo = idCardNo;
	}

	public String getTelephoneNo() {
		return telephoneNo;
	}

	public void setTelephoneNo(String telephoneNo) {
		this.telephoneNo = telephoneNo;
	}

	public DistributorDetails getDistributorDetails() {
		return distributorDetails;
	}

	public void setDistributorDetails(DistributorDetails distributorDetails) {
		this.distributorDetails = distributorDetails;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getShopName() {
		return shopName;
	}

	public void setShopName(String shopName) {
		this.shopName = shopName;
	}

	public String getCooperationType() {
		return cooperationType;
	}

	public void setCooperationType(String cooperationType) {
		this.cooperationType = cooperationType;
	}

	public String getSource() {
		return source;
	}

	public void setSource(String source) {
		this.source = source;
	}

	public Float getShopArea() {
		return shopArea;
	}

	public void setShopArea(Float shopArea) {
		this.shopArea = shopArea;
	}

	public String getShopStaff() {
		return shopStaff;
	}

	public void setShopStaff(String shopStaff) {
		this.shopStaff = shopStaff;
	}

	public Date getCooperationStartTime() {
		return cooperationStartTime;
	}

	public void setCooperationStartTime(Date cooperationStartTime) {
		this.cooperationStartTime = cooperationStartTime;
	}

	public Date getCooperationEndTime() {
		return cooperationEndTime;
	}

	public void setCooperationEndTime(Date cooperationEndTime) {
		this.cooperationEndTime = cooperationEndTime;
	}

	public Date getRegisterTime() {
		return registerTime;
	}

	public void setRegisterTime(Date registerTime) {
		this.registerTime = registerTime;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public String getRecordNo() {
		return recordNo;
	}

	public void setRecordNo(String recordNo) {
		this.recordNo = recordNo;
	}

	public String getEducation() {
		return education;
	}

	public void setEducation(String education) {
		this.education = education;
	}

	public String getOccupation() {
		return occupation;
	}

	public void setOccupation(String occupation) {
		this.occupation = occupation;
	}

	public String getCustomerLevel() {
		return customerLevel;
	}

	public void setCustomerLevel(String customerLevel) {
		this.customerLevel = customerLevel;
	}
	
	public String getWx() {
		return wx;
	}

	public void setWx(String wx) {
		this.wx = wx;
	}

	public String getPersonalDesc() {
		return personalDesc;
	}

	public void setPersonalDesc(String personalDesc) {
		this.personalDesc = personalDesc;
	}

	public String getFeedback() {
		return feedback;
	}

	public void setFeedback(String feedback) {
		this.feedback = feedback;
	}

	public String getMarryStatus() {
		return marryStatus;
	}

	public void setMarryStatus(String marryStatus) {
		this.marryStatus = marryStatus;
	}

	public String getChildStatus() {
		return childStatus;
	}

	public void setChildStatus(String childStatus) {
		this.childStatus = childStatus;
	}

	public String getIsHasRecord() {
		return isHasRecord;
	}

	public void setIsHasRecord(String isHasRecord) {
		this.isHasRecord = isHasRecord;
	}

	public String getMedicalHistory() {
		return medicalHistory;
	}

	public void setMedicalHistory(String medicalHistory) {
		this.medicalHistory = medicalHistory;
	}

	public Date getBirthday() {
		return birthday;
	}

	public void setBirthday(Date birthday) {
		this.birthday = birthday;
	}

	public Integer getAge() {
		return age;
	}

	public void setAge(Integer age) {
		this.age = age;
	}

	public String getBirthdayBegin() {
		return birthdayBegin;
	}

	public void setBirthdayBegin(String birthdayBegin) {
		this.birthdayBegin = birthdayBegin;
	}

	public String getBirthdayEnd() {
		return birthdayEnd;
	}

	public void setBirthdayEnd(String birthdayEnd) {
		this.birthdayEnd = birthdayEnd;
	}

	public String getBirthdayMmdd() {
		return birthdayMmdd;
	}

	public void setBirthdayMmdd(String birthdayMmdd) {
		this.birthdayMmdd = birthdayMmdd;
	}

	public String getLevel() {
		return level;
	}

	public void setLevel(String level) {
		this.level = level;
	}

	public BigDecimal getLeftRebate() {
		return leftRebate;
	}

	public void setLeftRebate(BigDecimal leftRebate) {
		this.leftRebate = leftRebate;
	}

	public Integer getCustomerCount() {
		return customerCount;
	}

	public void setCustomerCount(Integer customerCount) {
		this.customerCount = customerCount;
	}

	public String getDisplayName() {
		return displayName;
	}

	public void setDisplayName(String displayName) {
		this.displayName = displayName;
	}

	public String getRecommendShopName() {
		return recommendShopName;
	}

	public void setRecommendShopName(String recommendShopName) {
		this.recommendShopName = recommendShopName;
	}

}